define([
], function(require, factory) {
    'use strict';
    function getdate () {
        var date = new Date();
        var seperator = "-";
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        var oneDay = 24 * 60 * 60 * 1000
        var day = date.getDay();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var formatDate = function(date){
            var currentData = date ? new Date(date) : new Date()
            var year = currentData.getFullYear();
            var month = currentData.getMonth()+1;
            var date = currentData.getDate();
            month = month < 10 ? '0' + month : month
            date = date < 10 ? '0' + date : date
            return year + '-' + month + '-' + date
        }
        var currentdate = year + seperator + month + seperator + strDate;
        var currentweek = [formatDate(new Date() - (day * oneDay)), formatDate((6 - day) * oneDay + +new Date())]
        var currentmonth = [formatDate(year + '-' + month + '-' + '01'), formatDate(year + '-' + month + '-' + new Date(year, month, 0).getDate())];
        
        return {
            currentdate,
            currentweek,
            currentmonth
        }
    }
    return getdate()
});